<template>
  <div>
    <ul>
      <li v-for="(item, index) in arr" :key="index">
    {{ item }}
      </li>
      <button @click="changeOrder">走一走</button>
    </ul>
  </div>
</template>

<script>
export default {
  data () {
    return {
      arr: ['帅哥', '美女', '程序员']
    }
  },
  methods: {
    changeOrder () {
      const str = this.arr[0] // 暂存首个数据
      this.arr.shift()
      this.arr.push(str)
      console.log(this.arr)
    }
  }
}
</script>

<style lang="less"></style>
